/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz;

import optativa911.Problema1;
import optativa911.Ciudad;
import optativa911.GestorOperador;
import optativa911.GestorCiudad;
import optativa911.Operador;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.beans.PropertyVetoException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.table.DefaultTableModel;
import optativa911.Validaciones;

/**
 *
 * @author INGENIERIA
 */
public class InterfazOperador extends javax.swing.JInternalFrame {
    DefaultTableModel modelocli = new DefaultTableModel();
    DefaultTableModel modelofactura = new DefaultTableModel();
    GestorCiudad ciudades=new GestorCiudad();
    Ciudad ciudad=new Ciudad();
    String apellido=null;
    String ciu=null;
    String nombre=null;
    String cedula=null;
    String direccion=null;
    GestorOperador clientes=new GestorOperador();
    Operador cliente=new Operador();
    boolean operacion=false;
    ArrayList listacli=new ArrayList();
    ArrayList listaciu=new ArrayList();
    Object listaAtributos[]=new Object[5];
    ImageIcon ImgValido=new ImageIcon(getClass().getResource( "/Imagenes/CampoValido.jpg" ));
    ImageIcon ImgInvalido=new ImageIcon(getClass().getResource( "/Imagenes/CampoInvalido.jpg" ));
    mipanel bgrTitulo = new mipanel(821, 36,"/imagenes/title_panel1.jpg");
    DefaultComboBoxModel modeloCiudadCombo=new DefaultComboBoxModel();    
    //mipanel panelMensajeI = new mipanel(474, 33,"/imagenes/title_panel.jpg");
    DefaultListModel modeloCiudades=new DefaultListModel();
    Validaciones validacedula=new Validaciones();
    public GestorOperador getClientes() {
        return clientes;
    }

    public void setClientes(GestorOperador gestorc) {
        this.clientes = gestorc;
    }

    public boolean isOperacion() {
        return operacion;
    }

    public void setOperacion(boolean operacion) {
        this.operacion = operacion;
    }
    /**
     * Creates new form IngresoProyecto
     */
    public InterfazOperador() {
        initComponents();
        pnlMensaje.setVisible(false);
        pnlIngresoCliente.setVisible(false);
        pnlMenu.setVisible(true);
        pnlModificacion.setVisible(true);
        modelofactura.addColumn("Cedula");
        modelofactura.addColumn("Numero");
        modelofactura.addColumn("Fecha");
        modelofactura.addColumn("Total");       
        tblCliente.setModel(modelocli);
//        tblFac.setModel(modelofactura);
        modelocli.addColumn("Codigo");
        modelocli.addColumn("Nombre");
        modelocli.addColumn("Apellido");
        modelocli.addColumn("Direccion");
        modelocli.addColumn("Ciudad");
        modelocli.addColumn("Cant. Facturas");
        jPanel1.add(bgrTitulo);
        jPanel1.repaint();
        //pnlMensaje.add(panelMensajeI);
        //pnlMensaje.repaint();
        //pnlMenu.add(panelMenuI);
        //pnlMenu.repaint();
    }

    public void limpiar()
    {
        int tamanio= modelocli.getRowCount();
        for(int i=0;i<tamanio;i++)
        {
            modelocli.removeRow(0);
        }
    }

    public void agregarElementos()
    {
        limpiar();
        //System.out.println(getGestorp().getLista().size()+"");
        clientes.listar();
        listacli=clientes.getClientes();
        Iterator it = listacli.iterator();
        while (it.hasNext())
        {
            Operador c=(Operador) it.next();
            ciudad.setIdciudad(c.buscarCiudad());
            ciudad.buscar();
            Object atributosCli[]={c.getCedula(),c.getNombre(),c.getApellido(),ciudad.getNombreciudad()};
            modelocli.addRow(atributosCli);
            
        }
        System.out.println(pnlMenu.getWidth()+" a "+pnlMenu.getHeight());
        System.out.println("Numero:"+modelocli.getRowCount());
    }
    
    
   
    public void limpiarproductos()
    {
        int tamanio= modelofactura.getRowCount();
        for(int i=0;i<tamanio;i++)
        {
            modelofactura.removeRow(0);
        }
    }
    
    public void agregarCiudadesCombo()
    {
        modeloCiudadCombo.removeAllElements();
        ciudades.listar();
        listaciu=ciudades.getCiudades();
        Iterator it = listaciu.iterator();
        while (it.hasNext())
        {
            Ciudad c=(Ciudad) it.next();
            modeloCiudadCombo.addElement(c.nombreciudad);
            
        }
        cmbCiudad.setModel(modeloCiudadCombo);    
    }

    public boolean Validar()
    {
        boolean cli=false;
        if(valced.getIcon().equals(ImgInvalido) ||valNom.getIcon().equals(ImgInvalido) || valApe.getIcon().equals(ImgInvalido) || valDir.getIcon().equals(ImgInvalido))
        {
            cli=false;
        }
        else
        {
            cli=true;
        }
        return cli;
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlMensaje = new javax.swing.JPanel();
        lblMensaje = new javax.swing.JLabel();
        btnCerrarMensaje = new javax.swing.JButton();
        lblVerificar = new javax.swing.JLabel();
        pnlMenu = new javax.swing.JPanel();
        btnIngresar = new javax.swing.JButton();
        btnModificar = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();
        pnlIngresoCliente = new javax.swing.JPanel();
        lblNombre1 = new javax.swing.JLabel();
        lblFechaTerminacion1 = new javax.swing.JLabel();
        lblCodigo1 = new javax.swing.JLabel();
        txtApellido = new javax.swing.JTextField();
        lblFechaInicio1 = new javax.swing.JLabel();
        txtDireccion = new javax.swing.JTextField();
        txtCedula = new javax.swing.JTextField();
        txtNombre = new javax.swing.JTextField();
        btnNuevo = new javax.swing.JButton();
        btnGrabar = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();
        valDir = new javax.swing.JLabel();
        valNom = new javax.swing.JLabel();
        valApe = new javax.swing.JLabel();
        cmbCiudad = new javax.swing.JComboBox();
        lblLibro = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        lstCiudad = new javax.swing.JList();
        btnAgregar = new javax.swing.JButton();
        pnlGrilla = new javax.swing.JPanel();
        valced = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        pnlModificacion = new javax.swing.JPanel();
        pnlGrilla1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblCliente = new javax.swing.JTable();

        setBackground(new java.awt.Color(250, 249, 242));
        setBorder(null);
        setForeground(new java.awt.Color(255, 255, 102));

        pnlMensaje.setBackground(new java.awt.Color(250, 247, 247));
        pnlMensaje.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        lblMensaje.setBackground(new java.awt.Color(250, 247, 247));

        btnCerrarMensaje.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cerrar.jpg"))); // NOI18N
        btnCerrarMensaje.setToolTipText("Cerrar Mensaje");
        btnCerrarMensaje.setBorder(null);
        btnCerrarMensaje.setOpaque(false);
        btnCerrarMensaje.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarMensajeActionPerformed(evt);
            }
        });

        lblVerificar.setAutoscrolls(true);

        javax.swing.GroupLayout pnlMensajeLayout = new javax.swing.GroupLayout(pnlMensaje);
        pnlMensaje.setLayout(pnlMensajeLayout);
        pnlMensajeLayout.setHorizontalGroup(
            pnlMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMensajeLayout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addComponent(lblMensaje, javax.swing.GroupLayout.PREFERRED_SIZE, 393, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblVerificar, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(btnCerrarMensaje))
        );
        pnlMensajeLayout.setVerticalGroup(
            pnlMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlMensajeLayout.createSequentialGroup()
                .addGroup(pnlMensajeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblMensaje, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(lblVerificar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCerrarMensaje, javax.swing.GroupLayout.Alignment.LEADING))
                .addContainerGap())
        );

        pnlMenu.setBackground(new java.awt.Color(250, 247, 247));
        pnlMenu.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        pnlMenu.setPreferredSize(new java.awt.Dimension(490, 44));

        btnIngresar.setBackground(new java.awt.Color(250, 247, 247));
        btnIngresar.setForeground(new java.awt.Color(255, 255, 255));
        btnIngresar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_ingresar.jpg"))); // NOI18N
        btnIngresar.setBorder(null);
        btnIngresar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnIngresar.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);
        btnIngresar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIngresarActionPerformed(evt);
            }
        });

        btnModificar.setBackground(new java.awt.Color(250, 247, 247));
        btnModificar.setForeground(new java.awt.Color(255, 255, 255));
        btnModificar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_modificar.jpg"))); // NOI18N
        btnModificar.setBorder(null);
        btnModificar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnModificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnModificarActionPerformed(evt);
            }
        });

        btnEliminar.setBackground(new java.awt.Color(250, 247, 247));
        btnEliminar.setForeground(new java.awt.Color(255, 255, 255));
        btnEliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_eliminar.jpg"))); // NOI18N
        btnEliminar.setBorder(null);
        btnEliminar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlMenuLayout = new javax.swing.GroupLayout(pnlMenu);
        pnlMenu.setLayout(pnlMenuLayout);
        pnlMenuLayout.setHorizontalGroup(
            pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMenuLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnIngresar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnModificar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnEliminar)
                .addContainerGap(131, Short.MAX_VALUE))
        );
        pnlMenuLayout.setVerticalGroup(
            pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlMenuLayout.createSequentialGroup()
                .addGroup(pnlMenuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnIngresar)
                    .addComponent(btnModificar)
                    .addComponent(btnEliminar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlIngresoCliente.setBackground(new java.awt.Color(250, 247, 247));
        pnlIngresoCliente.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder(""), "Ingreso De Clientes"));

        lblNombre1.setText("Nombre:");

        lblFechaTerminacion1.setText("Contraseña:");

        lblCodigo1.setText("Cedula:");

        txtApellido.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtApellidoFocusLost(evt);
            }
        });

        lblFechaInicio1.setText("Apellido:");

        txtDireccion.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtDireccionFocusLost(evt);
            }
        });

        txtCedula.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCedulaActionPerformed(evt);
            }
        });
        txtCedula.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtCedulaFocusLost(evt);
            }
        });

        txtNombre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNombreActionPerformed(evt);
            }
        });
        txtNombre.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtNombreFocusLost(evt);
            }
        });

        btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_nuevo.jpg"))); // NOI18N
        btnNuevo.setBorder(null);
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        btnGrabar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_grabar.jpg"))); // NOI18N
        btnGrabar.setBorder(null);
        btnGrabar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGrabarActionPerformed(evt);
            }
        });

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cmd_cancel.jpg"))); // NOI18N
        btnCancelar.setBorder(null);
        btnCancelar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnCancelarMouseClicked(evt);
            }
        });
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });

        valDir.setBackground(new java.awt.Color(250, 247, 247));
        valDir.setOpaque(true);

        valNom.setBackground(new java.awt.Color(250, 247, 247));
        valNom.setOpaque(true);

        valApe.setBackground(new java.awt.Color(250, 247, 247));
        valApe.setOpaque(true);

        cmbCiudad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbCiudadActionPerformed(evt);
            }
        });
        cmbCiudad.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                cmbCiudadFocusLost(evt);
            }
        });

        lblLibro.setText("Ciudad:");

        jScrollPane4.setViewportView(lstCiudad);

        btnAgregar.setBackground(new java.awt.Color(250, 247, 247));
        btnAgregar.setForeground(new java.awt.Color(255, 255, 255));
        btnAgregar.setBorder(null);
        btnAgregar.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        btnAgregar.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);
        btnAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarActionPerformed(evt);
            }
        });

        pnlGrilla.setBackground(new java.awt.Color(250, 247, 247));

        javax.swing.GroupLayout pnlGrillaLayout = new javax.swing.GroupLayout(pnlGrilla);
        pnlGrilla.setLayout(pnlGrillaLayout);
        pnlGrillaLayout.setHorizontalGroup(
            pnlGrillaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 547, Short.MAX_VALUE)
        );
        pnlGrillaLayout.setVerticalGroup(
            pnlGrillaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 38, Short.MAX_VALUE)
        );

        valced.setBackground(new java.awt.Color(250, 247, 247));
        valced.setOpaque(true);

        javax.swing.GroupLayout pnlIngresoClienteLayout = new javax.swing.GroupLayout(pnlIngresoCliente);
        pnlIngresoCliente.setLayout(pnlIngresoClienteLayout);
        pnlIngresoClienteLayout.setHorizontalGroup(
            pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                .addGap(89, 89, 89)
                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                        .addComponent(btnNuevo)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnGrabar)
                        .addGap(10, 10, 10)
                        .addComponent(btnCancelar)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblNombre1)
                            .addComponent(lblFechaInicio1)
                            .addComponent(lblFechaTerminacion1)
                            .addComponent(lblCodigo1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtDireccion)
                            .addComponent(txtCedula, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)
                            .addComponent(txtNombre)
                            .addComponent(txtApellido))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(valApe, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(valNom, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(valDir, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(valced, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(36, 36, 36)
                        .addComponent(lblLibro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cmbCiudad, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(6, 6, 6)
                        .addComponent(btnAgregar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(20, 20, 20))))
            .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addComponent(pnlGrilla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 47, Short.MAX_VALUE))
        );
        pnlIngresoClienteLayout.setVerticalGroup(
            pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(lblCodigo1)
                                        .addComponent(txtCedula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(valced, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(lblNombre1)
                                        .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(valNom, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(14, 14, 14)
                                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(valApe, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(lblFechaInicio1)
                                        .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(pnlIngresoClienteLayout.createSequentialGroup()
                                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblLibro)
                                    .addComponent(cmbCiudad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lblFechaTerminacion1)
                                .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(valDir, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(26, 26, 26)
                .addComponent(pnlGrilla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(29, 29, 29)
                .addGroup(pnlIngresoClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCancelar)
                    .addComponent(btnNuevo)
                    .addComponent(btnGrabar))
                .addContainerGap())
        );

        jPanel1.setBackground(new java.awt.Color(250, 249, 242));

        jLabel1.setText("CLIENTES: Ingreso Modificación Eliminación");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 401, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlModificacion.setBackground(new java.awt.Color(250, 247, 247));
        pnlModificacion.setBorder(javax.swing.BorderFactory.createTitledBorder("Lista De Facturas"));

        pnlGrilla1.setBackground(new java.awt.Color(250, 247, 247));

        tblCliente.setAutoCreateRowSorter(true);
        tblCliente.setBackground(new java.awt.Color(250, 249, 242));
        tblCliente.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        tblCliente.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Cedula", "Nombre", "Apellido", "Ciudad"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tblCliente.setGridColor(new java.awt.Color(51, 51, 51));
        tblCliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblClienteMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tblCliente);
        tblCliente.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

        javax.swing.GroupLayout pnlGrilla1Layout = new javax.swing.GroupLayout(pnlGrilla1);
        pnlGrilla1.setLayout(pnlGrilla1Layout);
        pnlGrilla1Layout.setHorizontalGroup(
            pnlGrilla1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlGrilla1Layout.createSequentialGroup()
                .addGap(0, 20, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 647, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        pnlGrilla1Layout.setVerticalGroup(
            pnlGrilla1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlGrilla1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlModificacionLayout = new javax.swing.GroupLayout(pnlModificacion);
        pnlModificacion.setLayout(pnlModificacionLayout);
        pnlModificacionLayout.setHorizontalGroup(
            pnlModificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlModificacionLayout.createSequentialGroup()
                .addComponent(pnlGrilla1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlModificacionLayout.setVerticalGroup(
            pnlModificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlGrilla1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(161, 161, 161)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(pnlMenu, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
                            .addComponent(pnlMensaje, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addComponent(pnlIngresoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(pnlModificacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(71, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlMensaje, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(pnlIngresoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(34, 34, 34)
                .addComponent(pnlModificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(70, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        // TODO add your handling code here:
   int verificador=0;     
        if(tblCliente.getSelectedRow()!=-1)
        {
            cliente.setCedula((tblCliente.getValueAt(tblCliente.getSelectedRow(), 0)).toString());
            cliente.buscar();
            verificador=cliente.eliminar();
            if(verificador==0){
                cliente.eliminar();
                agregarElementos();
                lblMensaje.setText("Cliente Eliminado Correctamente");
                lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/bien.jpg" )));
                pnlMensaje.setVisible(true);
            }else{
            lblMensaje.setText("No se puede eliminar clave foranea");
            lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
            pnlMensaje.setVisible(true);       
            }
        }
        else
        {
            lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
            lblMensaje.setText("Error: Elija el Cliente a eliminar");
            pnlMensaje.setVisible(true);
        }
    }//GEN-LAST:event_btnEliminarActionPerformed

    private void btnCerrarMensajeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarMensajeActionPerformed
        // TODO add your handling code here:
        lblMensaje.setText("");
        pnlMensaje.setVisible(false);

    }//GEN-LAST:event_btnCerrarMensajeActionPerformed

    private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIngresarActionPerformed
        // TODO add your handling code here:
        operacion=false;
        pnlIngresoCliente.setVisible(true);
        pnlMenu.setVisible(false);
        pnlModificacion.setVisible(false);
        txtCedula.setEditable(true);
        agregarCiudadesCombo();
        cmbCiudad.setSelectedIndex(-1);
        valNom.setIcon(ImgInvalido);
        valApe.setIcon(ImgInvalido);
        valDir.setIcon(ImgInvalido);
        valced.setIcon(ImgInvalido);
        txtCedula.requestFocus();
    }//GEN-LAST:event_btnIngresarActionPerformed

    private void btnModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarActionPerformed
        // TODO add your handling code here:
        if(tblCliente.getSelectedRow()!=-1)
        {
            operacion=true;
            pnlMenu.setVisible(false);
            pnlModificacion.setVisible(false);
            pnlIngresoCliente.setVisible(true);
            cliente.setCedula((tblCliente.getValueAt(tblCliente.getSelectedRow(), 0)).toString());
            cliente.buscar();
            agregarCiudadesCombo(); 
            ciudad.setIdciudad(cliente.buscarCiudad());
            ciudad.buscar();
           //clientebuscado=clientes.buscarResponsable((String)tblCliente.getValueAt(tblCliente.getSelectedRow(), 1));
            txtCedula.setText(cliente.getCedula()+"");
            txtCedula.setEditable(false);
            cmbCiudad.setSelectedItem(ciudad.getNombreciudad());
            cmbCiudad.setEditable(false);
            txtNombre.setText(cliente.getNombre());
            txtApellido.setText(cliente.getApellido());
            txtDireccion.setText(cliente.getDireccion()+"");
            valNom.setIcon(ImgValido);
            valApe.setIcon(ImgValido);
            valDir.setIcon(ImgValido);
            txtNombre.requestFocus();
            cliente.modificar(ciudad);
        }
        else
        {
            lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
            lblMensaje.setText("Error: Elija el Responsable a modificar");
            pnlMensaje.setVisible(true);
        }

    }//GEN-LAST:event_btnModificarActionPerformed

  
    
    private void txtNombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNombreActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtNombreActionPerformed

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
        // TODO add your handling code here:
        txtCedula.setText(null);
        txtApellido.setText(null);
        txtDireccion.setText(null);
        txtNombre.setText(null);
        agregarCiudadesCombo();
        cmbCiudad.setSelectedIndex(-1);        
        valNom.setIcon(ImgInvalido);
        valApe.setIcon(ImgInvalido);
        valDir.setIcon(ImgInvalido);
        txtCedula.requestFocus();
    }//GEN-LAST:event_btnNuevoActionPerformed

    private void btnGrabarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGrabarActionPerformed
        // TODO add your handling code here:
        int verificador=0;
        if (Validar()==true){
            cedula = txtCedula.getText();
            nombre = this.txtNombre.getText();
            apellido=this.txtApellido.getText();
            direccion = txtDireccion.getText();
            ciu=cmbCiudad.getSelectedItem().toString();
            cliente.setCedula(cedula);
            cliente.setNombre(nombre);
            cliente.setApellido(apellido);
            cliente.setDireccion(direccion);
            ciudad.setNombreciudad(ciu);
            ciudad.buscarNombre();
            if (operacion == false) {
                verificador = cliente.grabar(ciudad);
                if(verificador==0){
                cliente.grabar(ciudad);
                lblMensaje.setText("Operador guardado Satisfactoriamente");
                }else{
                lblMensaje.setText("No se permiten claves repetidas");
                lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
                }  
            } else {
                cliente.modificar(ciudad);
                lblMensaje.setText("Operador Modificado Satisfactoriamente");
                btnCancelarActionPerformed(evt);
                lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/bien.jpg" )));
            }
            

        } else {

            if(operacion==false) {
                lblMensaje.setText("Error: No se pudo guardar el Cliente");
            } else {
                lblMensaje.setText("Error: No se pudo modificar el Cliente");
            }
            lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
        }
        pnlMensaje.setVisible(true);
    }//GEN-LAST:event_btnGrabarActionPerformed

    private void btnCancelarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCancelarMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnCancelarMouseClicked

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        // TODO add your handling code here:
        pnlIngresoCliente.setVisible(false);
        agregarElementos();
        btnNuevoActionPerformed(evt);
        pnlModificacion.setVisible(true);
        pnlMenu.setVisible(true);
    }//GEN-LAST:event_btnCancelarActionPerformed

    private void txtNombreFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtNombreFocusLost
        // TODO add your handling code here:
        try{
            Integer.parseInt(txtNombre.getText());
            valNom.setIcon(ImgInvalido);
        } catch (Exception ex)
        {
            if(txtNombre.getText().toString().equals(""))
                valNom.setIcon(ImgInvalido);
            else
                valNom.setIcon(ImgValido);
        }
    }//GEN-LAST:event_txtNombreFocusLost

    private void txtApellidoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtApellidoFocusLost
        // TODO add your handling code here:
        try{
            Integer.parseInt(txtApellido.getText());
                valApe.setIcon(ImgInvalido);

        } catch (Exception ex)
        {
            if(txtApellido.getText().toString().equals(""))
                valApe.setIcon(ImgInvalido);
            else
                valApe.setIcon(ImgValido);
        }
    }//GEN-LAST:event_txtApellidoFocusLost

    private void txtDireccionFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtDireccionFocusLost
        // TODO add your handling code here:
        try{
            Integer.parseInt(txtDireccion.getText());
            valDir.setIcon(ImgInvalido);

        } catch (Exception ex)
        {
            if(txtDireccion.getText().toString().equals(""))
            valDir.setIcon(ImgInvalido);
            else
            valDir.setIcon(ImgValido);
        }        
    }//GEN-LAST:event_txtDireccionFocusLost

    private void txtCedulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCedulaActionPerformed
        // TODO add your handling code here:
       /* try{
            Integer.parseInt(txtCedula.getText());
            valNom.setIcon(ImgValido);

        } catch (Exception ex)
        {
            if(txtCedula.getText().toString().equals(""))
            valNom.setIcon(ImgInvalido);
            else
            valNom.setIcon(ImgValido);
        }      */
    }//GEN-LAST:event_txtCedulaActionPerformed

    private void cmbCiudadFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_cmbCiudadFocusLost
        // TODO add your handling code here:
    }//GEN-LAST:event_cmbCiudadFocusLost

    private void cmbCiudadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbCiudadActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cmbCiudadActionPerformed

    private void btnAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarActionPerformed
        // TODO add your handling code here:
        /*(cmbCiudad.getSelectedIndex()!=-1){
            String b= cmbCiudad.getSelectedItem().toString();
            ciudad.setNombreciudad(b);
            ciudad.buscarNombre();
            modeloCiudades.addElement(cmbCiudad.getSelectedItem().toString());
            lstCiudad.setModel(modeloCiudades);
        }*/
}//GEN-LAST:event_btnAgregarActionPerformed

    private void txtCedulaFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtCedulaFocusLost
         boolean valida=false;
        if(validacedula.validadorDeCedula(txtCedula.getText())==true)
        {
            valced.setIcon(ImgValido);
        }
        else
        {
            valced.setIcon(ImgInvalido);
            lblMensaje.setText("Error: Cedula Incorrecta");
            lblVerificar.setIcon(new ImageIcon( getClass().getResource( "/Imagenes/Error.jpg" )));
            pnlMensaje.setVisible(true);
        }
    }//GEN-LAST:event_txtCedulaFocusLost

    private void tblClienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblClienteMouseClicked
        // TODO add your handling code here:
        cliente.setCedula((tblCliente.getValueAt(tblCliente.getSelectedRow(), 0)).toString());
        int valida=cliente.buscar();
        if(valida==1)

        {
            cliente.buscar();}
        
      //  agregarFacturas(cliente.getCedula());
    }//GEN-LAST:event_tblClienteMouseClicked

    public class mipanel extends javax.swing.JPanel {
        String ruta;
        public mipanel(int ancho, int alto, String ruta){
            this.setSize(ancho,alto);
            this.ruta=ruta;           
        }

        @Override
        public void paint(Graphics g){
            
            Dimension tamanio = getSize();
            ImageIcon imagenFondo = new ImageIcon(getClass().getResource(ruta));
            g.drawImage(imagenFondo.getImage(),0,0,tamanio.width, tamanio.height, null);
            setOpaque(false);
            super.paintComponent(g);

        }
        
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAgregar;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnCerrarMensaje;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnGrabar;
    private javax.swing.JButton btnIngresar;
    private javax.swing.JButton btnModificar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JComboBox cmbCiudad;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JLabel lblCodigo1;
    private javax.swing.JLabel lblFechaInicio1;
    private javax.swing.JLabel lblFechaTerminacion1;
    private javax.swing.JLabel lblLibro;
    private javax.swing.JLabel lblMensaje;
    private javax.swing.JLabel lblNombre1;
    private javax.swing.JLabel lblVerificar;
    private javax.swing.JList lstCiudad;
    private javax.swing.JPanel pnlGrilla;
    private javax.swing.JPanel pnlGrilla1;
    private javax.swing.JPanel pnlIngresoCliente;
    private javax.swing.JPanel pnlMensaje;
    private javax.swing.JPanel pnlMenu;
    private javax.swing.JPanel pnlModificacion;
    private javax.swing.JTable tblCliente;
    private javax.swing.JTextField txtApellido;
    private javax.swing.JTextField txtCedula;
    private javax.swing.JTextField txtDireccion;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JLabel valApe;
    private javax.swing.JLabel valDir;
    private javax.swing.JLabel valNom;
    private javax.swing.JLabel valced;
    // End of variables declaration//GEN-END:variables
}


